{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Training VAE"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Once data is loaded into DeepTCR, we can begin to train the variational autoencoder (VAE) which will learn the latent represnetation of the TCR sequences. This latent representation is learned from all possible inputs into DeepTCR (including alpha,beta chains, v/d/j gene usage). To train the VAE,we will first load data and then execute the Train_VAE command."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Loading Data...\n",
      "Embedding Sequences...\n",
      "Data Loaded\n"
     ]
    }
   ],
   "source": [
    "import sys\n",
    "sys.path.append('../../')\n",
    "from DeepTCR.DeepTCR import DeepTCR_U\n",
    "\n",
    "# Instantiate training object\n",
    "DTCRU = DeepTCR_U('Tutorial')\n",
    "\n",
    "#Load Data from directories\n",
    "DTCRU.Get_Data(directory='../../Data/Murine_Antigens',Load_Prev_Data=False,aggregate_by_aa=True,\n",
    "               aa_column_beta=0,count_column=1,v_beta_column=2,j_beta_column=3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Colocations handled automatically by placer.\n",
      "WARNING:tensorflow:From ../../DeepTCR/functions/Layers.py:98: conv2d (from tensorflow.python.layers.convolutional) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Use keras.layers.conv2d instead.\n",
      "WARNING:tensorflow:From ../../DeepTCR/functions/Layers.py:99: flatten (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Use keras.layers.flatten instead.\n",
      "WARNING:tensorflow:From ../../DeepTCR/functions/Layers.py:102: dropout (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Use keras.layers.dropout instead.\n",
      "WARNING:tensorflow:From ../../DeepTCR/DeepTCR.py:1673: dense (from tensorflow.python.layers.core) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Use keras.layers.dense instead.\n",
      "WARNING:tensorflow:From ../../DeepTCR/DeepTCR.py:1691: conv2d_transpose (from tensorflow.python.layers.convolutional) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Use keras.layers.conv2d_transpose instead.\n",
      "WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Use tf.cast instead.\n",
      "Epoch = 0/50000 Total Loss: 8.20008: Recon Loss: 19787.00000: Latent Loss: 196.597366: AE Accuracy: 0.05436\n",
      "Epoch = 1/50000 Total Loss: 7.80829: Recon Loss: 18833.66016: Latent Loss: 195.144272: AE Accuracy: 0.07079\n",
      "Epoch = 2/50000 Total Loss: 7.51172: Recon Loss: 18109.75391: Latent Loss: 196.316422: AE Accuracy: 0.09314\n",
      "Epoch = 3/50000 Total Loss: 7.31204: Recon Loss: 17617.31836: Latent Loss: 202.123611: AE Accuracy: 0.12013\n",
      "Epoch = 4/50000 Total Loss: 7.13697: Recon Loss: 17173.62891: Latent Loss: 219.165192: AE Accuracy: 0.15190\n",
      "Epoch = 5/50000 Total Loss: 7.03596: Recon Loss: 16892.17969: Latent Loss: 254.444000: AE Accuracy: 0.17595\n",
      "Epoch = 6/50000 Total Loss: 6.92703: Recon Loss: 16598.54297: Latent Loss: 282.631134: AE Accuracy: 0.19762\n",
      "Epoch = 7/50000 Total Loss: 6.83854: Recon Loss: 16393.93750: Latent Loss: 271.581970: AE Accuracy: 0.21219\n",
      "Epoch = 8/50000 Total Loss: 6.71732: Recon Loss: 16125.10156: Latent Loss: 245.012146: AE Accuracy: 0.22651\n",
      "Epoch = 9/50000 Total Loss: 6.64237: Recon Loss: 15964.80078: Latent Loss: 222.657639: AE Accuracy: 0.23532\n",
      "Epoch = 10/50000 Total Loss: 6.55325: Recon Loss: 15762.44434: Latent Loss: 207.831085: AE Accuracy: 0.24743\n",
      "Epoch = 11/50000 Total Loss: 6.42323: Recon Loss: 15451.72754: Latent Loss: 201.676132: AE Accuracy: 0.26777\n",
      "Epoch = 12/50000 Total Loss: 6.27937: Recon Loss: 15099.91211: Latent Loss: 202.903427: AE Accuracy: 0.28207\n",
      "Epoch = 13/50000 Total Loss: 6.10713: Recon Loss: 14673.13574: Latent Loss: 209.949356: AE Accuracy: 0.29861\n",
      "Epoch = 14/50000 Total Loss: 5.90932: Recon Loss: 14183.54492: Latent Loss: 217.470886: AE Accuracy: 0.31380\n",
      "Epoch = 15/50000 Total Loss: 5.70127: Recon Loss: 13674.06250: Latent Loss: 219.932114: AE Accuracy: 0.34400\n",
      "Epoch = 16/50000 Total Loss: 5.47379: Recon Loss: 13114.03809: Latent Loss: 225.595016: AE Accuracy: 0.37712\n",
      "Epoch = 17/50000 Total Loss: 5.28339: Recon Loss: 12632.85840: Latent Loss: 242.758041: AE Accuracy: 0.40270\n",
      "Epoch = 18/50000 Total Loss: 5.10249: Recon Loss: 12167.45117: Latent Loss: 267.316040: AE Accuracy: 0.41702\n",
      "Epoch = 19/50000 Total Loss: 4.93720: Recon Loss: 11746.80273: Latent Loss: 285.165039: AE Accuracy: 0.42585\n",
      "Epoch = 20/50000 Total Loss: 4.74490: Recon Loss: 11266.28125: Latent Loss: 297.029572: AE Accuracy: 0.45177\n",
      "Epoch = 21/50000 Total Loss: 4.56721: Recon Loss: 10824.10840: Latent Loss: 306.177643: AE Accuracy: 0.46513\n",
      "Epoch = 22/50000 Total Loss: 4.36122: Recon Loss: 10316.77148: Latent Loss: 311.517365: AE Accuracy: 0.47915\n",
      "Epoch = 23/50000 Total Loss: 4.22995: Recon Loss: 9988.41406: Latent Loss: 319.984100: AE Accuracy: 0.48390\n",
      "Epoch = 24/50000 Total Loss: 4.04993: Recon Loss: 9542.51270: Latent Loss: 327.154846: AE Accuracy: 0.50289\n",
      "Epoch = 25/50000 Total Loss: 3.90177: Recon Loss: 9172.54102: Latent Loss: 336.064575: AE Accuracy: 0.51389\n",
      "Epoch = 26/50000 Total Loss: 3.76370: Recon Loss: 8825.81641: Latent Loss: 346.332825: AE Accuracy: 0.52757\n",
      "Epoch = 27/50000 Total Loss: 3.57942: Recon Loss: 8362.01172: Latent Loss: 361.035797: AE Accuracy: 0.54808\n",
      "Epoch = 28/50000 Total Loss: 3.43368: Recon Loss: 7985.85693: Latent Loss: 382.020905: AE Accuracy: 0.55721\n",
      "Epoch = 29/50000 Total Loss: 3.31917: Recon Loss: 7688.56299: Latent Loss: 400.244751: AE Accuracy: 0.57652\n",
      "Epoch = 30/50000 Total Loss: 3.19627: Recon Loss: 7375.04639: Latent Loss: 414.274658: AE Accuracy: 0.58731\n",
      "Epoch = 31/50000 Total Loss: 3.08076: Recon Loss: 7084.12695: Latent Loss: 423.678101: AE Accuracy: 0.59780\n",
      "Epoch = 32/50000 Total Loss: 2.97375: Recon Loss: 6820.23730: Latent Loss: 426.780609: AE Accuracy: 0.60383\n",
      "Epoch = 33/50000 Total Loss: 2.84631: Recon Loss: 6502.12793: Latent Loss: 434.334534: AE Accuracy: 0.61608\n",
      "Epoch = 34/50000 Total Loss: 2.73527: Recon Loss: 6222.19336: Latent Loss: 443.661560: AE Accuracy: 0.62349\n",
      "Epoch = 35/50000 Total Loss: 2.62035: Recon Loss: 5930.50293: Latent Loss: 455.298584: AE Accuracy: 0.63865\n",
      "Epoch = 36/50000 Total Loss: 2.52756: Recon Loss: 5686.30273: Latent Loss: 473.367645: AE Accuracy: 0.65107\n",
      "Epoch = 37/50000 Total Loss: 2.41473: Recon Loss: 5389.44922: Latent Loss: 495.249237: AE Accuracy: 0.66501\n",
      "Epoch = 38/50000 Total Loss: 2.33739: Recon Loss: 5180.24219: Latent Loss: 515.988647: AE Accuracy: 0.67419\n",
      "Epoch = 39/50000 Total Loss: 2.25431: Recon Loss: 4965.45508: Latent Loss: 528.299805: AE Accuracy: 0.68632\n",
      "Epoch = 40/50000 Total Loss: 2.13054: Recon Loss: 4656.02051: Latent Loss: 536.102112: AE Accuracy: 0.69881\n",
      "Epoch = 41/50000 Total Loss: 2.07536: Recon Loss: 4508.69531: Latent Loss: 548.947388: AE Accuracy: 0.69864\n",
      "Epoch = 42/50000 Total Loss: 1.98632: Recon Loss: 4278.18945: Latent Loss: 562.479492: AE Accuracy: 0.71192\n",
      "Epoch = 43/50000 Total Loss: 1.89618: Recon Loss: 4052.44141: Latent Loss: 568.540894: AE Accuracy: 0.72004\n",
      "Epoch = 44/50000 Total Loss: 1.81801: Recon Loss: 3852.87842: Latent Loss: 577.610474: AE Accuracy: 0.73210\n",
      "Epoch = 45/50000 Total Loss: 1.74850: Recon Loss: 3672.11401: Latent Loss: 588.987854: AE Accuracy: 0.74122\n",
      "Epoch = 46/50000 Total Loss: 1.68665: Recon Loss: 3516.17676: Latent Loss: 594.196838: AE Accuracy: 0.74583\n",
      "Epoch = 47/50000 Total Loss: 1.60276: Recon Loss: 3315.13525: Latent Loss: 590.782288: AE Accuracy: 0.75414\n",
      "Epoch = 48/50000 Total Loss: 1.54596: Recon Loss: 3178.75903: Latent Loss: 588.746155: AE Accuracy: 0.76114\n",
      "Epoch = 49/50000 Total Loss: 1.48424: Recon Loss: 3030.56934: Latent Loss: 586.534424: AE Accuracy: 0.76618\n",
      "Epoch = 50/50000 Total Loss: 1.44175: Recon Loss: 2927.29492: Latent Loss: 586.248962: AE Accuracy: 0.77132\n",
      "Epoch = 51/50000 Total Loss: 1.38479: Recon Loss: 2784.66675: Latent Loss: 590.071899: AE Accuracy: 0.77762\n",
      "Epoch = 52/50000 Total Loss: 1.34557: Recon Loss: 2691.64087: Latent Loss: 587.505737: AE Accuracy: 0.78278\n",
      "Epoch = 53/50000 Total Loss: 1.30565: Recon Loss: 2601.66504: Latent Loss: 580.210754: AE Accuracy: 0.78680\n",
      "Epoch = 54/50000 Total Loss: 1.26855: Recon Loss: 2518.58594: Latent Loss: 572.861267: AE Accuracy: 0.79051\n",
      "Epoch = 55/50000 Total Loss: 1.22003: Recon Loss: 2404.34351: Latent Loss: 568.869141: AE Accuracy: 0.79788\n",
      "Epoch = 56/50000 Total Loss: 1.19596: Recon Loss: 2347.86475: Latent Loss: 566.678711: AE Accuracy: 0.79871\n",
      "Epoch = 57/50000 Total Loss: 1.16485: Recon Loss: 2274.16699: Latent Loss: 564.560364: AE Accuracy: 0.80458\n",
      "Epoch = 58/50000 Total Loss: 1.13463: Recon Loss: 2202.82104: Latent Loss: 562.271545: AE Accuracy: 0.80615\n",
      "Epoch = 59/50000 Total Loss: 1.10848: Recon Loss: 2140.98779: Latent Loss: 560.386230: AE Accuracy: 0.80650\n",
      "Epoch = 60/50000 Total Loss: 1.08550: Recon Loss: 2086.66333: Latent Loss: 558.705383: AE Accuracy: 0.81127\n",
      "Epoch = 61/50000 Total Loss: 1.06438: Recon Loss: 2038.17517: Latent Loss: 555.724854: AE Accuracy: 0.81101\n",
      "Epoch = 62/50000 Total Loss: 1.03550: Recon Loss: 1971.63318: Latent Loss: 551.868286: AE Accuracy: 0.81439\n",
      "Epoch = 63/50000 Total Loss: 1.02217: Recon Loss: 1947.97803: Latent Loss: 543.043762: AE Accuracy: 0.81612\n",
      "Epoch = 64/50000 Total Loss: 0.99657: Recon Loss: 1893.21851: Latent Loss: 535.428589: AE Accuracy: 0.81948\n",
      "Epoch = 65/50000 Total Loss: 0.98423: Recon Loss: 1869.42407: Latent Loss: 529.152710: AE Accuracy: 0.81797\n",
      "Epoch = 66/50000 Total Loss: 0.96755: Recon Loss: 1832.28418: Latent Loss: 525.628296: AE Accuracy: 0.81963\n",
      "Epoch = 67/50000 Total Loss: 0.95445: Recon Loss: 1802.78613: Latent Loss: 523.212463: AE Accuracy: 0.82085\n",
      "Epoch = 68/50000 Total Loss: 0.94501: Recon Loss: 1786.64575: Latent Loss: 516.334229: AE Accuracy: 0.82148\n",
      "Epoch = 69/50000 Total Loss: 0.91575: Recon Loss: 1726.33337: Latent Loss: 505.353668: AE Accuracy: 0.82467\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch = 70/50000 Total Loss: 0.91096: Recon Loss: 1726.32373: Latent Loss: 493.686462: AE Accuracy: 0.82462\n",
      "Epoch = 71/50000 Total Loss: 0.89654: Recon Loss: 1698.13281: Latent Loss: 486.742096: AE Accuracy: 0.82538\n",
      "Epoch = 72/50000 Total Loss: 0.87861: Recon Loss: 1658.31934: Latent Loss: 482.864258: AE Accuracy: 0.82828\n",
      "Epoch = 73/50000 Total Loss: 0.87259: Recon Loss: 1646.87769: Latent Loss: 479.626770: AE Accuracy: 0.82838\n",
      "Epoch = 74/50000 Total Loss: 0.85850: Recon Loss: 1620.61523: Latent Loss: 471.553467: AE Accuracy: 0.82910\n",
      "Epoch = 75/50000 Total Loss: 0.85177: Recon Loss: 1614.47961: Latent Loss: 461.291962: AE Accuracy: 0.83033\n",
      "Epoch = 76/50000 Total Loss: 0.85133: Recon Loss: 1619.97449: Latent Loss: 454.726288: AE Accuracy: 0.82967\n",
      "Epoch = 77/50000 Total Loss: 0.83097: Recon Loss: 1573.75708: Latent Loss: 451.320618: AE Accuracy: 0.83289\n",
      "Epoch = 78/50000 Total Loss: 0.82662: Recon Loss: 1570.68713: Latent Loss: 443.777069: AE Accuracy: 0.83310\n",
      "Epoch = 79/50000 Total Loss: 0.81678: Recon Loss: 1554.67175: Latent Loss: 435.822510: AE Accuracy: 0.83262\n",
      "Epoch = 80/50000 Total Loss: 0.80657: Recon Loss: 1533.44165: Latent Loss: 432.178680: AE Accuracy: 0.83387\n",
      "Epoch = 81/50000 Total Loss: 0.80195: Recon Loss: 1524.54346: Latent Loss: 429.807953: AE Accuracy: 0.83361\n",
      "Epoch = 82/50000 Total Loss: 0.80025: Recon Loss: 1525.58472: Latent Loss: 424.627747: AE Accuracy: 0.83366\n",
      "Epoch = 83/50000 Total Loss: 0.78399: Recon Loss: 1492.97095: Latent Loss: 417.622925: AE Accuracy: 0.83777\n",
      "Epoch = 84/50000 Total Loss: 0.78191: Recon Loss: 1491.67212: Latent Loss: 413.843201: AE Accuracy: 0.83691\n",
      "Epoch = 85/50000 Total Loss: 0.76894: Recon Loss: 1460.10217: Latent Loss: 413.802002: AE Accuracy: 0.83763\n",
      "Epoch = 86/50000 Total Loss: 0.76198: Recon Loss: 1446.57056: Latent Loss: 410.373108: AE Accuracy: 0.83956\n",
      "Epoch = 87/50000 Total Loss: 0.75965: Recon Loss: 1446.23291: Latent Loss: 405.028320: AE Accuracy: 0.83940\n",
      "Epoch = 88/50000 Total Loss: 0.75307: Recon Loss: 1435.97705: Latent Loss: 399.248993: AE Accuracy: 0.84120\n",
      "Epoch = 89/50000 Total Loss: 0.74586: Recon Loss: 1421.85034: Latent Loss: 395.804138: AE Accuracy: 0.84196\n",
      "Epoch = 90/50000 Total Loss: 0.74150: Recon Loss: 1412.96777: Latent Loss: 394.060669: AE Accuracy: 0.84202\n",
      "Epoch = 91/50000 Total Loss: 0.74557: Recon Loss: 1422.48401: Latent Loss: 394.475159: AE Accuracy: 0.84201\n",
      "Epoch = 92/50000 Total Loss: 0.73078: Recon Loss: 1392.00854: Latent Loss: 388.913910: AE Accuracy: 0.84389\n",
      "Epoch = 93/50000 Total Loss: 0.72495: Recon Loss: 1382.29761: Latent Loss: 384.398956: AE Accuracy: 0.84533\n",
      "Epoch = 94/50000 Total Loss: 0.72015: Recon Loss: 1372.69556: Latent Loss: 382.318481: AE Accuracy: 0.84520\n",
      "Epoch = 95/50000 Total Loss: 0.71274: Recon Loss: 1354.06433: Latent Loss: 382.875977: AE Accuracy: 0.84624\n",
      "Epoch = 96/50000 Total Loss: 0.69981: Recon Loss: 1325.66431: Latent Loss: 379.762482: AE Accuracy: 0.84762\n",
      "Epoch = 97/50000 Total Loss: 0.70420: Recon Loss: 1344.23804: Latent Loss: 371.906616: AE Accuracy: 0.84620\n",
      "Epoch = 98/50000 Total Loss: 0.70542: Recon Loss: 1349.94885: Latent Loss: 369.159485: AE Accuracy: 0.84661\n",
      "Epoch = 99/50000 Total Loss: 0.69691: Recon Loss: 1327.83569: Latent Loss: 370.523346: AE Accuracy: 0.84815\n",
      "Epoch = 100/50000 Total Loss: 0.68786: Recon Loss: 1305.79456: Latent Loss: 370.520508: AE Accuracy: 0.85073\n",
      "Epoch = 101/50000 Total Loss: 0.69520: Recon Loss: 1326.73157: Latent Loss: 367.473358: AE Accuracy: 0.84940\n",
      "Epoch = 102/50000 Total Loss: 0.68627: Recon Loss: 1310.97620: Latent Loss: 361.457825: AE Accuracy: 0.85077\n",
      "Epoch = 103/50000 Total Loss: 0.68987: Recon Loss: 1325.93591: Latent Loss: 355.285492: AE Accuracy: 0.84950\n",
      "Epoch = 104/50000 Total Loss: 0.67030: Recon Loss: 1278.03149: Latent Loss: 355.489044: AE Accuracy: 0.85192\n",
      "Epoch = 105/50000 Total Loss: 0.68008: Recon Loss: 1298.49792: Latent Loss: 358.857361: AE Accuracy: 0.85217\n",
      "Epoch = 106/50000 Total Loss: 0.67730: Recon Loss: 1294.58667: Latent Loss: 355.994537: AE Accuracy: 0.85208\n",
      "Epoch = 107/50000 Total Loss: 0.67245: Recon Loss: 1286.15576: Latent Loss: 352.595093: AE Accuracy: 0.85343\n",
      "Epoch = 108/50000 Total Loss: 0.65910: Recon Loss: 1255.27551: Latent Loss: 350.954712: AE Accuracy: 0.85497\n",
      "Epoch = 109/50000 Total Loss: 0.66315: Recon Loss: 1264.95190: Latent Loss: 351.135925: AE Accuracy: 0.85548\n",
      "Epoch = 110/50000 Total Loss: 0.66687: Recon Loss: 1274.49585: Latent Loss: 350.661041: AE Accuracy: 0.85614\n",
      "Epoch = 111/50000 Total Loss: 0.65349: Recon Loss: 1245.80957: Latent Loss: 346.738495: AE Accuracy: 0.85761\n",
      "Epoch = 112/50000 Total Loss: 0.65313: Recon Loss: 1246.93250: Latent Loss: 344.741577: AE Accuracy: 0.85694\n",
      "Epoch = 113/50000 Total Loss: 0.64280: Recon Loss: 1221.08362: Latent Loss: 345.429779: AE Accuracy: 0.85796\n",
      "Epoch = 114/50000 Total Loss: 0.64302: Recon Loss: 1219.36841: Latent Loss: 347.674683: AE Accuracy: 0.85956\n",
      "Epoch = 115/50000 Total Loss: 0.64042: Recon Loss: 1213.40344: Latent Loss: 347.309296: AE Accuracy: 0.86212\n",
      "Epoch = 116/50000 Total Loss: 0.63761: Recon Loss: 1210.81702: Latent Loss: 343.046600: AE Accuracy: 0.86221\n",
      "Epoch = 117/50000 Total Loss: 0.63143: Recon Loss: 1199.09229: Latent Loss: 339.694885: AE Accuracy: 0.86296\n",
      "Epoch = 118/50000 Total Loss: 0.63406: Recon Loss: 1204.94739: Latent Loss: 340.255890: AE Accuracy: 0.86366\n",
      "Epoch = 119/50000 Total Loss: 0.62614: Recon Loss: 1184.41260: Latent Loss: 341.495972: AE Accuracy: 0.86399\n",
      "Epoch = 120/50000 Total Loss: 0.62768: Recon Loss: 1188.29834: Latent Loss: 341.357330: AE Accuracy: 0.86352\n",
      "Epoch = 121/50000 Total Loss: 0.62532: Recon Loss: 1183.86328: Latent Loss: 340.042114: AE Accuracy: 0.86569\n",
      "Epoch = 122/50000 Total Loss: 0.63436: Recon Loss: 1205.40820: Latent Loss: 340.517853: AE Accuracy: 0.86518\n",
      "Epoch = 123/50000 Total Loss: 0.63243: Recon Loss: 1200.00757: Latent Loss: 341.215271: AE Accuracy: 0.86470\n",
      "Epoch = 124/50000 Total Loss: 0.61843: Recon Loss: 1165.42651: Latent Loss: 341.676575: AE Accuracy: 0.86858\n",
      "Epoch = 125/50000 Total Loss: 0.61010: Recon Loss: 1146.23132: Latent Loss: 340.589966: AE Accuracy: 0.86811\n",
      "Epoch = 126/50000 Total Loss: 0.62035: Recon Loss: 1175.25659: Latent Loss: 336.544128: AE Accuracy: 0.86725\n",
      "Epoch = 127/50000 Total Loss: 0.60563: Recon Loss: 1141.98853: Latent Loss: 333.940796: AE Accuracy: 0.86906\n",
      "Epoch = 128/50000 Total Loss: 0.61384: Recon Loss: 1161.15332: Latent Loss: 334.775574: AE Accuracy: 0.86829\n",
      "Epoch = 129/50000 Total Loss: 0.60726: Recon Loss: 1144.15869: Latent Loss: 335.733276: AE Accuracy: 0.86941\n",
      "Epoch = 130/50000 Total Loss: 0.60626: Recon Loss: 1140.74805: Latent Loss: 336.702850: AE Accuracy: 0.87073\n",
      "Epoch = 131/50000 Total Loss: 0.60308: Recon Loss: 1132.58813: Latent Loss: 337.116150: AE Accuracy: 0.87131\n",
      "Epoch = 132/50000 Total Loss: 0.60650: Recon Loss: 1143.84619: Latent Loss: 334.188110: AE Accuracy: 0.87140\n",
      "Epoch = 133/50000 Total Loss: 0.59710: Recon Loss: 1119.93555: Latent Loss: 335.192017: AE Accuracy: 0.87031\n",
      "Epoch = 134/50000 Total Loss: 0.60112: Recon Loss: 1128.34009: Latent Loss: 336.580902: AE Accuracy: 0.87108\n",
      "Epoch = 135/50000 Total Loss: 0.58997: Recon Loss: 1099.97327: Latent Loss: 337.793152: AE Accuracy: 0.87414\n",
      "Epoch = 136/50000 Total Loss: 0.59307: Recon Loss: 1106.72534: Latent Loss: 338.578064: AE Accuracy: 0.87222\n",
      "Epoch = 137/50000 Total Loss: 0.58538: Recon Loss: 1087.37793: Latent Loss: 339.189545: AE Accuracy: 0.87492\n",
      "Epoch = 138/50000 Total Loss: 0.58601: Recon Loss: 1090.39502: Latent Loss: 337.704346: AE Accuracy: 0.87602\n",
      "Epoch = 139/50000 Total Loss: 0.57871: Recon Loss: 1076.08923: Latent Loss: 334.225281: AE Accuracy: 0.87685\n",
      "Epoch = 140/50000 Total Loss: 0.57735: Recon Loss: 1072.97449: Latent Loss: 334.032349: AE Accuracy: 0.87643\n",
      "Epoch = 141/50000 Total Loss: 0.57364: Recon Loss: 1062.76819: Latent Loss: 335.184875: AE Accuracy: 0.87824\n",
      "Epoch = 142/50000 Total Loss: 0.57820: Recon Loss: 1073.63281: Latent Loss: 335.435577: AE Accuracy: 0.87882\n",
      "Epoch = 143/50000 Total Loss: 0.58828: Recon Loss: 1100.24219: Latent Loss: 333.386871: AE Accuracy: 0.87631\n",
      "Epoch = 144/50000 Total Loss: 0.57702: Recon Loss: 1072.23853: Latent Loss: 333.949615: AE Accuracy: 0.87883\n",
      "Epoch = 145/50000 Total Loss: 0.56875: Recon Loss: 1051.51672: Latent Loss: 334.517883: AE Accuracy: 0.88113\n",
      "Epoch = 146/50000 Total Loss: 0.57050: Recon Loss: 1054.09692: Latent Loss: 336.218506: AE Accuracy: 0.88025\n",
      "Epoch = 147/50000 Total Loss: 0.56470: Recon Loss: 1041.77698: Latent Loss: 334.404907: AE Accuracy: 0.88068\n",
      "Epoch = 148/50000 Total Loss: 0.57596: Recon Loss: 1071.02734: Latent Loss: 332.590424: AE Accuracy: 0.88060\n",
      "Epoch = 149/50000 Total Loss: 0.56256: Recon Loss: 1037.38733: Latent Loss: 333.567780: AE Accuracy: 0.88082\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch = 150/50000 Total Loss: 0.56517: Recon Loss: 1039.52625: Latent Loss: 337.780884: AE Accuracy: 0.88275\n",
      "Epoch = 151/50000 Total Loss: 0.55659: Recon Loss: 1018.74750: Latent Loss: 337.664154: AE Accuracy: 0.88364\n",
      "Epoch = 152/50000 Total Loss: 0.55358: Recon Loss: 1015.12769: Latent Loss: 333.937622: AE Accuracy: 0.88389\n",
      "Epoch = 153/50000 Total Loss: 0.55539: Recon Loss: 1021.84607: Latent Loss: 331.634430: AE Accuracy: 0.88585\n",
      "Epoch = 154/50000 Total Loss: 0.55183: Recon Loss: 1010.29602: Latent Loss: 334.502380: AE Accuracy: 0.88510\n",
      "Epoch = 155/50000 Total Loss: 0.54718: Recon Loss: 999.10583: Latent Loss: 334.376862: AE Accuracy: 0.88535\n",
      "Epoch = 156/50000 Total Loss: 0.54975: Recon Loss: 1008.47339: Latent Loss: 331.276642: AE Accuracy: 0.88546\n",
      "Epoch = 157/50000 Total Loss: 0.55297: Recon Loss: 1017.58899: Latent Loss: 330.003510: AE Accuracy: 0.88585\n",
      "Epoch = 158/50000 Total Loss: 0.54613: Recon Loss: 1001.07922: Latent Loss: 329.845764: AE Accuracy: 0.88785\n",
      "Epoch = 159/50000 Total Loss: 0.54399: Recon Loss: 993.40808: Latent Loss: 332.300110: AE Accuracy: 0.88811\n",
      "Epoch = 160/50000 Total Loss: 0.53928: Recon Loss: 981.96484: Latent Loss: 332.265747: AE Accuracy: 0.88855\n",
      "Epoch = 161/50000 Total Loss: 0.54254: Recon Loss: 992.79761: Latent Loss: 329.373108: AE Accuracy: 0.88945\n",
      "Epoch = 162/50000 Total Loss: 0.54132: Recon Loss: 992.88867: Latent Loss: 326.299805: AE Accuracy: 0.88881\n",
      "Epoch = 163/50000 Total Loss: 0.53387: Recon Loss: 976.10974: Latent Loss: 324.935730: AE Accuracy: 0.88957\n",
      "Epoch = 164/50000 Total Loss: 0.54018: Recon Loss: 989.62390: Latent Loss: 326.791290: AE Accuracy: 0.88937\n",
      "Epoch = 165/50000 Total Loss: 0.53693: Recon Loss: 978.99316: Latent Loss: 329.516296: AE Accuracy: 0.89043\n",
      "Epoch = 166/50000 Total Loss: 0.53311: Recon Loss: 971.66968: Latent Loss: 327.510803: AE Accuracy: 0.89194\n",
      "Epoch = 167/50000 Total Loss: 0.52830: Recon Loss: 961.15454: Latent Loss: 326.301300: AE Accuracy: 0.89225\n",
      "Epoch = 168/50000 Total Loss: 0.53183: Recon Loss: 969.45398: Latent Loss: 326.610413: AE Accuracy: 0.89263\n",
      "Epoch = 169/50000 Total Loss: 0.53820: Recon Loss: 983.38586: Latent Loss: 328.195496: AE Accuracy: 0.89094\n",
      "Epoch = 170/50000 Total Loss: 0.53100: Recon Loss: 966.06750: Latent Loss: 327.989288: AE Accuracy: 0.89173\n",
      "Epoch = 171/50000 Total Loss: 0.52315: Recon Loss: 949.15656: Latent Loss: 325.756378: AE Accuracy: 0.89259\n",
      "Epoch = 172/50000 Total Loss: 0.53711: Recon Loss: 985.21313: Latent Loss: 323.714386: AE Accuracy: 0.89008\n",
      "Epoch = 173/50000 Total Loss: 0.51916: Recon Loss: 942.70581: Latent Loss: 322.497528: AE Accuracy: 0.89296\n",
      "Epoch = 174/50000 Total Loss: 0.53536: Recon Loss: 979.36804: Latent Loss: 325.298553: AE Accuracy: 0.89161\n",
      "Epoch = 175/50000 Total Loss: 0.51916: Recon Loss: 936.69000: Latent Loss: 328.504456: AE Accuracy: 0.89256\n",
      "Epoch = 176/50000 Total Loss: 0.51799: Recon Loss: 934.40332: Latent Loss: 327.939850: AE Accuracy: 0.89294\n",
      "Epoch = 177/50000 Total Loss: 0.51381: Recon Loss: 926.59119: Latent Loss: 325.563660: AE Accuracy: 0.89434\n",
      "Epoch = 178/50000 Total Loss: 0.51657: Recon Loss: 934.84985: Latent Loss: 324.028839: AE Accuracy: 0.89438\n",
      "Epoch = 179/50000 Total Loss: 0.51810: Recon Loss: 937.39478: Latent Loss: 325.225952: AE Accuracy: 0.89643\n",
      "Epoch = 180/50000 Total Loss: 0.51546: Recon Loss: 926.03101: Latent Loss: 330.137512: AE Accuracy: 0.89453\n",
      "Epoch = 181/50000 Total Loss: 0.51372: Recon Loss: 921.70337: Latent Loss: 330.230408: AE Accuracy: 0.89391\n",
      "Epoch = 182/50000 Total Loss: 0.50606: Recon Loss: 906.43384: Latent Loss: 326.842773: AE Accuracy: 0.89575\n",
      "Epoch = 183/50000 Total Loss: 0.51419: Recon Loss: 928.54822: Latent Loss: 324.541382: AE Accuracy: 0.89648\n",
      "Epoch = 184/50000 Total Loss: 0.50803: Recon Loss: 911.94653: Latent Loss: 326.123169: AE Accuracy: 0.89645\n",
      "Epoch = 185/50000 Total Loss: 0.50507: Recon Loss: 901.86377: Latent Loss: 328.981934: AE Accuracy: 0.89735\n",
      "Epoch = 186/50000 Total Loss: 0.50588: Recon Loss: 903.07727: Latent Loss: 329.759338: AE Accuracy: 0.89754\n",
      "Epoch = 187/50000 Total Loss: 0.51353: Recon Loss: 922.27411: Latent Loss: 329.205994: AE Accuracy: 0.89736\n",
      "Epoch = 188/50000 Total Loss: 0.50259: Recon Loss: 898.01703: Latent Loss: 326.793640: AE Accuracy: 0.89899\n",
      "Epoch = 189/50000 Total Loss: 0.50080: Recon Loss: 894.26685: Latent Loss: 326.171387: AE Accuracy: 0.89976\n",
      "Epoch = 190/50000 Total Loss: 0.49626: Recon Loss: 881.61761: Latent Loss: 327.757141: AE Accuracy: 0.89953\n",
      "Epoch = 191/50000 Total Loss: 0.49497: Recon Loss: 876.31494: Latent Loss: 329.920624: AE Accuracy: 0.89948\n",
      "Epoch = 192/50000 Total Loss: 0.49091: Recon Loss: 867.13788: Latent Loss: 329.219818: AE Accuracy: 0.90040\n",
      "Epoch = 193/50000 Total Loss: 0.49856: Recon Loss: 888.18732: Latent Loss: 326.793243: AE Accuracy: 0.90043\n",
      "Epoch = 194/50000 Total Loss: 0.49103: Recon Loss: 875.21960: Latent Loss: 321.413483: AE Accuracy: 0.90003\n",
      "Epoch = 195/50000 Total Loss: 0.49826: Recon Loss: 895.77905: Latent Loss: 318.470978: AE Accuracy: 0.89879\n",
      "Epoch = 196/50000 Total Loss: 0.50114: Recon Loss: 904.03033: Latent Loss: 317.258118: AE Accuracy: 0.89973\n",
      "Epoch = 197/50000 Total Loss: 0.49104: Recon Loss: 877.54871: Latent Loss: 319.104401: AE Accuracy: 0.90099\n",
      "Epoch = 198/50000 Total Loss: 0.49146: Recon Loss: 875.80640: Latent Loss: 321.883667: AE Accuracy: 0.89995\n",
      "Epoch = 199/50000 Total Loss: 0.48338: Recon Loss: 857.30383: Latent Loss: 320.700317: AE Accuracy: 0.90176\n",
      "Epoch = 200/50000 Total Loss: 0.49118: Recon Loss: 877.63641: Latent Loss: 319.371613: AE Accuracy: 0.90146\n",
      "Epoch = 201/50000 Total Loss: 0.48518: Recon Loss: 864.00098: Latent Loss: 318.390228: AE Accuracy: 0.90188\n",
      "Epoch = 202/50000 Total Loss: 0.48627: Recon Loss: 865.02667: Latent Loss: 320.013214: AE Accuracy: 0.90218\n",
      "Epoch = 203/50000 Total Loss: 0.48419: Recon Loss: 858.27881: Latent Loss: 321.691589: AE Accuracy: 0.90190\n",
      "Epoch = 204/50000 Total Loss: 0.48110: Recon Loss: 851.01538: Latent Loss: 321.428528: AE Accuracy: 0.90334\n",
      "Epoch = 205/50000 Total Loss: 0.48635: Recon Loss: 864.56934: Latent Loss: 320.655273: AE Accuracy: 0.90278\n",
      "Epoch = 206/50000 Total Loss: 0.49426: Recon Loss: 882.98566: Latent Loss: 321.522583: AE Accuracy: 0.90096\n",
      "Epoch = 207/50000 Total Loss: 0.47758: Recon Loss: 842.13892: Latent Loss: 321.724060: AE Accuracy: 0.90466\n",
      "Epoch = 208/50000 Total Loss: 0.48233: Recon Loss: 854.16785: Latent Loss: 321.269836: AE Accuracy: 0.90423\n",
      "Epoch = 209/50000 Total Loss: 0.48503: Recon Loss: 862.40625: Latent Loss: 319.599854: AE Accuracy: 0.90318\n",
      "Epoch = 210/50000 Total Loss: 0.48212: Recon Loss: 856.88501: Latent Loss: 318.043640: AE Accuracy: 0.90402\n",
      "Epoch = 211/50000 Total Loss: 0.47363: Recon Loss: 834.26807: Latent Loss: 319.974243: AE Accuracy: 0.90604\n",
      "Epoch = 212/50000 Total Loss: 0.48346: Recon Loss: 857.62842: Latent Loss: 320.563965: AE Accuracy: 0.90339\n",
      "Epoch = 213/50000 Total Loss: 0.47398: Recon Loss: 836.09888: Latent Loss: 318.987946: AE Accuracy: 0.90508\n",
      "Epoch = 214/50000 Total Loss: 0.47696: Recon Loss: 844.12006: Latent Loss: 318.231720: AE Accuracy: 0.90504\n",
      "Epoch = 215/50000 Total Loss: 0.47110: Recon Loss: 829.53552: Latent Loss: 318.536255: AE Accuracy: 0.90654\n",
      "Epoch = 216/50000 Total Loss: 0.47730: Recon Loss: 843.71747: Latent Loss: 319.455261: AE Accuracy: 0.90393\n",
      "Epoch = 217/50000 Total Loss: 0.47601: Recon Loss: 838.42242: Latent Loss: 321.620514: AE Accuracy: 0.90467\n",
      "Epoch = 218/50000 Total Loss: 0.48178: Recon Loss: 850.80688: Latent Loss: 323.279877: AE Accuracy: 0.90445\n",
      "Epoch = 219/50000 Total Loss: 0.47065: Recon Loss: 824.88110: Latent Loss: 322.089264: AE Accuracy: 0.90538\n",
      "Epoch = 220/50000 Total Loss: 0.47155: Recon Loss: 827.67529: Latent Loss: 321.490662: AE Accuracy: 0.90620\n",
      "Epoch = 221/50000 Total Loss: 0.47833: Recon Loss: 843.44482: Latent Loss: 322.256805: AE Accuracy: 0.90541\n",
      "Epoch = 222/50000 Total Loss: 0.46871: Recon Loss: 819.00568: Latent Loss: 323.250488: AE Accuracy: 0.90602\n",
      "Epoch = 223/50000 Total Loss: 0.46446: Recon Loss: 809.07690: Latent Loss: 322.809937: AE Accuracy: 0.90754\n",
      "Epoch = 224/50000 Total Loss: 0.47206: Recon Loss: 826.87109: Latent Loss: 323.528564: AE Accuracy: 0.90622\n",
      "Epoch = 225/50000 Total Loss: 0.46516: Recon Loss: 808.17761: Latent Loss: 325.426575: AE Accuracy: 0.90672\n",
      "Epoch = 226/50000 Total Loss: 0.46602: Recon Loss: 811.34467: Latent Loss: 324.347198: AE Accuracy: 0.90796\n",
      "Epoch = 227/50000 Total Loss: 0.47257: Recon Loss: 829.54938: Latent Loss: 322.093109: AE Accuracy: 0.90862\n",
      "Epoch = 228/50000 Total Loss: 0.46543: Recon Loss: 812.83362: Latent Loss: 321.423035: AE Accuracy: 0.90695\n",
      "Epoch = 229/50000 Total Loss: 0.46378: Recon Loss: 808.14709: Latent Loss: 322.076141: AE Accuracy: 0.90746\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch = 230/50000 Total Loss: 0.46082: Recon Loss: 799.17505: Latent Loss: 323.832458: AE Accuracy: 0.90940\n",
      "Epoch = 231/50000 Total Loss: 0.46585: Recon Loss: 809.78857: Latent Loss: 325.486755: AE Accuracy: 0.90822\n",
      "Epoch = 232/50000 Total Loss: 0.46484: Recon Loss: 806.93591: Latent Loss: 325.875549: AE Accuracy: 0.90845\n",
      "Epoch = 233/50000 Total Loss: 0.46097: Recon Loss: 796.88953: Latent Loss: 326.502899: AE Accuracy: 0.90950\n",
      "Epoch = 234/50000 Total Loss: 0.46684: Recon Loss: 812.58826: Latent Loss: 325.107849: AE Accuracy: 0.90908\n",
      "Epoch = 235/50000 Total Loss: 0.45384: Recon Loss: 782.73401: Latent Loss: 323.285400: AE Accuracy: 0.90989\n",
      "Epoch = 236/50000 Total Loss: 0.46437: Recon Loss: 807.56299: Latent Loss: 324.113281: AE Accuracy: 0.90942\n",
      "Epoch = 237/50000 Total Loss: 0.45871: Recon Loss: 794.54468: Latent Loss: 323.329712: AE Accuracy: 0.90974\n",
      "Epoch = 238/50000 Total Loss: 0.45379: Recon Loss: 784.58325: Latent Loss: 321.307617: AE Accuracy: 0.91068\n",
      "Epoch = 239/50000 Total Loss: 0.45953: Recon Loss: 799.20001: Latent Loss: 320.670319: AE Accuracy: 0.91028\n",
      "Epoch = 240/50000 Total Loss: 0.45670: Recon Loss: 792.61285: Latent Loss: 320.372284: AE Accuracy: 0.91008\n",
      "Epoch = 241/50000 Total Loss: 0.45772: Recon Loss: 795.27905: Latent Loss: 320.173401: AE Accuracy: 0.90961\n",
      "Epoch = 242/50000 Total Loss: 0.46070: Recon Loss: 802.10876: Latent Loss: 320.608521: AE Accuracy: 0.90963\n",
      "Epoch = 243/50000 Total Loss: 0.45824: Recon Loss: 795.53540: Latent Loss: 321.202454: AE Accuracy: 0.91009\n",
      "Epoch = 244/50000 Total Loss: 0.45066: Recon Loss: 778.42499: Latent Loss: 319.845184: AE Accuracy: 0.91088\n",
      "Epoch = 245/50000 Total Loss: 0.46052: Recon Loss: 802.14978: Latent Loss: 320.126556: AE Accuracy: 0.90936\n",
      "Epoch = 246/50000 Total Loss: 0.44571: Recon Loss: 765.32990: Latent Loss: 320.858887: AE Accuracy: 0.91161\n",
      "Epoch = 247/50000 Total Loss: 0.44784: Recon Loss: 769.25305: Latent Loss: 322.135437: AE Accuracy: 0.91236\n",
      "Epoch = 248/50000 Total Loss: 0.44878: Recon Loss: 769.78131: Latent Loss: 323.884033: AE Accuracy: 0.91177\n",
      "Epoch = 249/50000 Total Loss: 0.45719: Recon Loss: 790.71045: Latent Loss: 323.465210: AE Accuracy: 0.91064\n",
      "Epoch = 250/50000 Total Loss: 0.45239: Recon Loss: 780.00812: Latent Loss: 322.463379: AE Accuracy: 0.91175\n",
      "Epoch = 251/50000 Total Loss: 0.44717: Recon Loss: 766.27222: Latent Loss: 323.487579: AE Accuracy: 0.91233\n",
      "Epoch = 252/50000 Total Loss: 0.44271: Recon Loss: 754.61658: Latent Loss: 324.266479: AE Accuracy: 0.91363\n",
      "Epoch = 253/50000 Total Loss: 0.44050: Recon Loss: 749.94153: Latent Loss: 323.555054: AE Accuracy: 0.91385\n",
      "Epoch = 254/50000 Total Loss: 0.44800: Recon Loss: 770.70782: Latent Loss: 321.057129: AE Accuracy: 0.91264\n",
      "Epoch = 255/50000 Total Loss: 0.44864: Recon Loss: 773.76105: Latent Loss: 319.579468: AE Accuracy: 0.91259\n",
      "Epoch = 256/50000 Total Loss: 0.44525: Recon Loss: 766.36743: Latent Loss: 318.703888: AE Accuracy: 0.91286\n",
      "Epoch = 257/50000 Total Loss: 0.43480: Recon Loss: 740.16357: Latent Loss: 319.448639: AE Accuracy: 0.91444\n",
      "Epoch = 258/50000 Total Loss: 0.44906: Recon Loss: 773.93347: Latent Loss: 320.419739: AE Accuracy: 0.91223\n",
      "Epoch = 259/50000 Total Loss: 0.44171: Recon Loss: 757.69501: Latent Loss: 318.752808: AE Accuracy: 0.91326\n",
      "Epoch = 260/50000 Total Loss: 0.43785: Recon Loss: 749.55884: Latent Loss: 317.471619: AE Accuracy: 0.91400\n",
      "Epoch = 261/50000 Total Loss: 0.44255: Recon Loss: 762.05469: Latent Loss: 316.447998: AE Accuracy: 0.91365\n",
      "Epoch = 262/50000 Total Loss: 0.44071: Recon Loss: 757.31036: Latent Loss: 316.705902: AE Accuracy: 0.91486\n",
      "Epoch = 263/50000 Total Loss: 0.43043: Recon Loss: 731.89752: Latent Loss: 317.064392: AE Accuracy: 0.91589\n",
      "Epoch = 264/50000 Total Loss: 0.43629: Recon Loss: 747.04340: Latent Loss: 316.203979: AE Accuracy: 0.91571\n",
      "Epoch = 265/50000 Total Loss: 0.43188: Recon Loss: 736.45288: Latent Loss: 316.032227: AE Accuracy: 0.91490\n",
      "Epoch = 266/50000 Total Loss: 0.43929: Recon Loss: 754.82471: Latent Loss: 315.719147: AE Accuracy: 0.91558\n",
      "Epoch = 267/50000 Total Loss: 0.43271: Recon Loss: 740.65747: Latent Loss: 313.853912: AE Accuracy: 0.91580\n",
      "Epoch = 268/50000 Total Loss: 0.43518: Recon Loss: 747.11407: Latent Loss: 313.423889: AE Accuracy: 0.91553\n",
      "Epoch = 269/50000 Total Loss: 0.43507: Recon Loss: 746.02319: Latent Loss: 314.248352: AE Accuracy: 0.91474\n",
      "Epoch = 270/50000 Total Loss: 0.43372: Recon Loss: 742.28601: Latent Loss: 314.678101: AE Accuracy: 0.91536\n",
      "Epoch = 271/50000 Total Loss: 0.43856: Recon Loss: 753.69092: Latent Loss: 315.086090: AE Accuracy: 0.91424\n",
      "Epoch = 272/50000 Total Loss: 0.43317: Recon Loss: 741.20044: Latent Loss: 314.435944: AE Accuracy: 0.91576\n",
      "Epoch = 273/50000 Total Loss: 0.43225: Recon Loss: 739.67419: Latent Loss: 313.707581: AE Accuracy: 0.91529\n",
      "Epoch = 274/50000 Total Loss: 0.43317: Recon Loss: 741.72009: Latent Loss: 313.923584: AE Accuracy: 0.91546\n",
      "Epoch = 275/50000 Total Loss: 0.42620: Recon Loss: 724.20331: Latent Loss: 314.447327: AE Accuracy: 0.91726\n",
      "Epoch = 276/50000 Total Loss: 0.42633: Recon Loss: 724.38220: Latent Loss: 314.595215: AE Accuracy: 0.91622\n",
      "Epoch = 277/50000 Total Loss: 0.42846: Recon Loss: 726.40833: Latent Loss: 317.737549: AE Accuracy: 0.91715\n",
      "Epoch = 278/50000 Total Loss: 0.42932: Recon Loss: 727.27405: Latent Loss: 318.980042: AE Accuracy: 0.91603\n",
      "Epoch = 279/50000 Total Loss: 0.42546: Recon Loss: 720.71375: Latent Loss: 316.143219: AE Accuracy: 0.91788\n",
      "Epoch = 280/50000 Total Loss: 0.43302: Recon Loss: 740.28101: Latent Loss: 314.989807: AE Accuracy: 0.91742\n",
      "Epoch = 281/50000 Total Loss: 0.42721: Recon Loss: 726.35913: Latent Loss: 314.751953: AE Accuracy: 0.91635\n",
      "Epoch = 282/50000 Total Loss: 0.42763: Recon Loss: 725.47693: Latent Loss: 316.647736: AE Accuracy: 0.91629\n",
      "Epoch = 283/50000 Total Loss: 0.42666: Recon Loss: 721.89581: Latent Loss: 317.880615: AE Accuracy: 0.91632\n",
      "Epoch = 284/50000 Total Loss: 0.42887: Recon Loss: 728.76172: Latent Loss: 316.386322: AE Accuracy: 0.91731\n",
      "Epoch = 285/50000 Total Loss: 0.42888: Recon Loss: 730.86090: Latent Loss: 314.308105: AE Accuracy: 0.91755\n",
      "Epoch = 286/50000 Total Loss: 0.42439: Recon Loss: 721.21509: Latent Loss: 313.015930: AE Accuracy: 0.91755\n",
      "Epoch = 287/50000 Total Loss: 0.43210: Recon Loss: 738.44995: Latent Loss: 314.572662: AE Accuracy: 0.91660\n",
      "Epoch = 288/50000 Total Loss: 0.42420: Recon Loss: 718.26782: Latent Loss: 315.499634: AE Accuracy: 0.91836\n",
      "Epoch = 289/50000 Total Loss: 0.42887: Recon Loss: 729.05493: Latent Loss: 316.091461: AE Accuracy: 0.91726\n",
      "Epoch = 290/50000 Total Loss: 0.41996: Recon Loss: 707.81958: Latent Loss: 315.613953: AE Accuracy: 0.91771\n",
      "Epoch = 291/50000 Total Loss: 0.42257: Recon Loss: 713.49707: Latent Loss: 316.308929: AE Accuracy: 0.91776\n",
      "Epoch = 292/50000 Total Loss: 0.42526: Recon Loss: 717.92371: Latent Loss: 318.432190: AE Accuracy: 0.91750\n",
      "Epoch = 293/50000 Total Loss: 0.42253: Recon Loss: 708.40338: Latent Loss: 321.295990: AE Accuracy: 0.91775\n",
      "Epoch = 294/50000 Total Loss: 0.42454: Recon Loss: 712.40320: Latent Loss: 322.204803: AE Accuracy: 0.91835\n",
      "Epoch = 295/50000 Total Loss: 0.41898: Recon Loss: 700.32434: Latent Loss: 320.733398: AE Accuracy: 0.91954\n",
      "Epoch = 296/50000 Total Loss: 0.41742: Recon Loss: 697.39105: Latent Loss: 319.851288: AE Accuracy: 0.91932\n",
      "Epoch = 297/50000 Total Loss: 0.41796: Recon Loss: 698.78650: Latent Loss: 319.773132: AE Accuracy: 0.92004\n",
      "Epoch = 298/50000 Total Loss: 0.43461: Recon Loss: 739.67743: Latent Loss: 319.467163: AE Accuracy: 0.92015\n",
      "Epoch = 299/50000 Total Loss: 0.43434: Recon Loss: 740.52673: Latent Loss: 317.952271: AE Accuracy: 0.91775\n",
      "Epoch = 300/50000 Total Loss: 0.41738: Recon Loss: 701.02405: Latent Loss: 316.126770: AE Accuracy: 0.91907\n",
      "Epoch = 301/50000 Total Loss: 0.41260: Recon Loss: 688.91711: Latent Loss: 316.587463: AE Accuracy: 0.92005\n",
      "Epoch = 302/50000 Total Loss: 0.42437: Recon Loss: 717.13269: Latent Loss: 317.052917: AE Accuracy: 0.91806\n",
      "Epoch = 303/50000 Total Loss: 0.42731: Recon Loss: 724.40759: Latent Loss: 316.943024: AE Accuracy: 0.91782\n",
      "Epoch = 304/50000 Total Loss: 0.41701: Recon Loss: 700.60669: Latent Loss: 315.636841: AE Accuracy: 0.91834\n",
      "Epoch = 305/50000 Total Loss: 0.42535: Recon Loss: 721.42120: Latent Loss: 315.163147: AE Accuracy: 0.91863\n",
      "Epoch = 306/50000 Total Loss: 0.41833: Recon Loss: 704.43591: Latent Loss: 315.044495: AE Accuracy: 0.92043\n",
      "Epoch = 307/50000 Total Loss: 0.41452: Recon Loss: 693.75208: Latent Loss: 316.429993: AE Accuracy: 0.91947\n",
      "Epoch = 308/50000 Total Loss: 0.42204: Recon Loss: 710.47607: Latent Loss: 318.036560: AE Accuracy: 0.91896\n",
      "Epoch = 309/50000 Total Loss: 0.41747: Recon Loss: 698.17627: Latent Loss: 319.187592: AE Accuracy: 0.91940\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch = 310/50000 Total Loss: 0.41176: Recon Loss: 684.48480: Latent Loss: 318.962433: AE Accuracy: 0.92033\n",
      "Epoch = 311/50000 Total Loss: 0.41581: Recon Loss: 694.89520: Latent Loss: 318.445618: AE Accuracy: 0.91933\n",
      "Epoch = 312/50000 Total Loss: 0.41327: Recon Loss: 687.51202: Latent Loss: 319.632324: AE Accuracy: 0.92065\n",
      "Epoch = 313/50000 Total Loss: 0.41576: Recon Loss: 691.21936: Latent Loss: 321.984772: AE Accuracy: 0.92098\n",
      "Epoch = 314/50000 Total Loss: 0.41624: Recon Loss: 690.71375: Latent Loss: 323.664001: AE Accuracy: 0.92037\n",
      "Epoch = 315/50000 Total Loss: 0.41446: Recon Loss: 684.70435: Latent Loss: 325.326599: AE Accuracy: 0.92104\n",
      "Epoch = 316/50000 Total Loss: 0.41358: Recon Loss: 682.22522: Latent Loss: 325.669434: AE Accuracy: 0.92163\n",
      "Epoch = 317/50000 Total Loss: 0.41805: Recon Loss: 694.65784: Latent Loss: 324.140594: AE Accuracy: 0.92065\n",
      "Epoch = 318/50000 Total Loss: 0.41523: Recon Loss: 690.28656: Latent Loss: 321.637695: AE Accuracy: 0.92132\n",
      "Epoch = 319/50000 Total Loss: 0.40959: Recon Loss: 677.23328: Latent Loss: 320.940186: AE Accuracy: 0.92253\n",
      "Epoch = 320/50000 Total Loss: 0.41078: Recon Loss: 679.93542: Latent Loss: 321.131226: AE Accuracy: 0.92103\n",
      "Epoch = 321/50000 Total Loss: 0.41391: Recon Loss: 687.97620: Latent Loss: 320.720062: AE Accuracy: 0.92071\n",
      "Epoch = 322/50000 Total Loss: 0.41012: Recon Loss: 679.28931: Latent Loss: 320.165527: AE Accuracy: 0.92065\n",
      "Epoch = 323/50000 Total Loss: 0.40891: Recon Loss: 676.53070: Latent Loss: 319.977417: AE Accuracy: 0.92222\n",
      "Epoch = 324/50000 Total Loss: 0.40719: Recon Loss: 673.06836: Latent Loss: 319.264465: AE Accuracy: 0.92228\n",
      "Epoch = 325/50000 Total Loss: 0.41774: Recon Loss: 699.49829: Latent Loss: 318.542023: AE Accuracy: 0.92017\n",
      "Reconstruction Accuracy: 0.92065\n",
      "Training Done\n"
     ]
    }
   ],
   "source": [
    "#Train VAE\n",
    "DTCRU.Train_VAE(Load_Prev_Data=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We note that during training, statistics are output to the user inclluding the various types of losses and the reconstruction accuracy of the autoencoder. If no minimum accuracy is provided, the network will train until a convergence criterion is met. Of note, we can also change the latent dimensionality by modifying the latent_dim parameter. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch = 0/50000 Total Loss: 7.52173: Recon Loss: 18320.98438: Latent Loss: 9.464931: AE Accuracy: 0.04426\n",
      "Epoch = 1/50000 Total Loss: 7.40404: Recon Loss: 18034.50391: Latent Loss: 9.132315: AE Accuracy: 0.07133\n",
      "Epoch = 2/50000 Total Loss: 7.30164: Recon Loss: 17784.11133: Latent Loss: 9.990924: AE Accuracy: 0.09246\n",
      "Epoch = 3/50000 Total Loss: 7.19380: Recon Loss: 17518.75781: Latent Loss: 12.541744: AE Accuracy: 0.11385\n",
      "Epoch = 4/50000 Total Loss: 7.05094: Recon Loss: 17164.59961: Latent Loss: 18.533665: AE Accuracy: 0.14180\n",
      "Epoch = 5/50000 Total Loss: 6.89050: Recon Loss: 16760.09766: Latent Loss: 32.052914: AE Accuracy: 0.17041\n",
      "Epoch = 6/50000 Total Loss: 6.78117: Recon Loss: 16466.68750: Latent Loss: 59.023968: AE Accuracy: 0.20232\n",
      "Epoch = 7/50000 Total Loss: 6.67561: Recon Loss: 16195.45312: Latent Loss: 73.019043: AE Accuracy: 0.22961\n",
      "Epoch = 8/50000 Total Loss: 6.49626: Recon Loss: 15766.90723: Latent Loss: 64.470322: AE Accuracy: 0.25461\n",
      "Epoch = 9/50000 Total Loss: 6.33531: Recon Loss: 15380.14453: Latent Loss: 59.000313: AE Accuracy: 0.27029\n",
      "Epoch = 10/50000 Total Loss: 6.20507: Recon Loss: 15062.50391: Latent Loss: 59.254955: AE Accuracy: 0.28329\n",
      "Epoch = 11/50000 Total Loss: 6.01605: Recon Loss: 14595.99805: Latent Loss: 65.121628: AE Accuracy: 0.31395\n",
      "Epoch = 12/50000 Total Loss: 5.86661: Recon Loss: 14219.57715: Latent Loss: 77.346107: AE Accuracy: 0.32775\n",
      "Epoch = 13/50000 Total Loss: 5.64787: Recon Loss: 13673.40527: Latent Loss: 90.451210: AE Accuracy: 0.35469\n",
      "Epoch = 14/50000 Total Loss: 5.46349: Recon Loss: 13219.91113: Latent Loss: 94.602257: AE Accuracy: 0.37443\n",
      "Epoch = 15/50000 Total Loss: 5.31378: Recon Loss: 12855.06934: Latent Loss: 94.618797: AE Accuracy: 0.38517\n",
      "Epoch = 16/50000 Total Loss: 5.11065: Recon Loss: 12357.38184: Latent Loss: 97.278053: AE Accuracy: 0.40526\n",
      "Epoch = 17/50000 Total Loss: 4.95082: Recon Loss: 11958.04785: Latent Loss: 107.095802: AE Accuracy: 0.42072\n",
      "Epoch = 18/50000 Total Loss: 4.74554: Recon Loss: 11444.48828: Latent Loss: 120.392044: AE Accuracy: 0.44150\n",
      "Epoch = 19/50000 Total Loss: 4.56871: Recon Loss: 11000.75000: Latent Loss: 133.198746: AE Accuracy: 0.45666\n",
      "Epoch = 20/50000 Total Loss: 4.43421: Recon Loss: 10659.88184: Latent Loss: 146.277740: AE Accuracy: 0.47116\n",
      "Epoch = 21/50000 Total Loss: 4.26307: Recon Loss: 10229.59668: Latent Loss: 159.499130: AE Accuracy: 0.47723\n",
      "Epoch = 22/50000 Total Loss: 4.10841: Recon Loss: 9838.00195: Latent Loss: 174.197205: AE Accuracy: 0.49255\n",
      "Epoch = 23/50000 Total Loss: 3.99478: Recon Loss: 9547.26758: Latent Loss: 188.014557: AE Accuracy: 0.50289\n",
      "Epoch = 24/50000 Total Loss: 3.87377: Recon Loss: 9239.62988: Latent Loss: 200.756027: AE Accuracy: 0.51405\n",
      "Epoch = 25/50000 Total Loss: 3.74090: Recon Loss: 8911.88770: Latent Loss: 204.688843: AE Accuracy: 0.53121\n",
      "Epoch = 26/50000 Total Loss: 3.66365: Recon Loss: 8710.78906: Latent Loss: 217.532974: AE Accuracy: 0.53811\n",
      "Epoch = 27/50000 Total Loss: 3.53594: Recon Loss: 8378.00879: Latent Loss: 239.080170: AE Accuracy: 0.55480\n",
      "Epoch = 28/50000 Total Loss: 3.42895: Recon Loss: 8098.95215: Latent Loss: 257.391327: AE Accuracy: 0.56229\n",
      "Epoch = 29/50000 Total Loss: 3.29544: Recon Loss: 7766.50684: Latent Loss: 264.486389: AE Accuracy: 0.57158\n",
      "Epoch = 30/50000 Total Loss: 3.20802: Recon Loss: 7542.67285: Latent Loss: 275.269989: AE Accuracy: 0.58143\n",
      "Epoch = 31/50000 Total Loss: 3.11450: Recon Loss: 7301.60596: Latent Loss: 288.440460: AE Accuracy: 0.59450\n",
      "Epoch = 32/50000 Total Loss: 3.01711: Recon Loss: 7049.29004: Latent Loss: 303.399628: AE Accuracy: 0.60229\n",
      "Epoch = 33/50000 Total Loss: 2.90727: Recon Loss: 6764.44141: Latent Loss: 320.569122: AE Accuracy: 0.61692\n",
      "Epoch = 34/50000 Total Loss: 2.83028: Recon Loss: 6564.65674: Latent Loss: 332.727570: AE Accuracy: 0.62618\n",
      "Epoch = 35/50000 Total Loss: 2.73776: Recon Loss: 6332.30127: Latent Loss: 339.614227: AE Accuracy: 0.63173\n",
      "Epoch = 36/50000 Total Loss: 2.64871: Recon Loss: 6104.50098: Latent Loss: 350.413269: AE Accuracy: 0.64025\n",
      "Epoch = 37/50000 Total Loss: 2.54980: Recon Loss: 5853.57324: Latent Loss: 360.297668: AE Accuracy: 0.65182\n",
      "Epoch = 38/50000 Total Loss: 2.45733: Recon Loss: 5619.60107: Latent Loss: 368.923706: AE Accuracy: 0.65881\n",
      "Epoch = 39/50000 Total Loss: 2.37677: Recon Loss: 5416.34180: Latent Loss: 375.837219: AE Accuracy: 0.66613\n",
      "Epoch = 40/50000 Total Loss: 2.29951: Recon Loss: 5219.93066: Latent Loss: 383.986481: AE Accuracy: 0.67608\n",
      "Epoch = 41/50000 Total Loss: 2.21433: Recon Loss: 5003.83984: Latent Loss: 392.488373: AE Accuracy: 0.68818\n",
      "Epoch = 42/50000 Total Loss: 2.15317: Recon Loss: 4843.62012: Latent Loss: 403.661255: AE Accuracy: 0.69321\n",
      "Epoch = 43/50000 Total Loss: 2.08061: Recon Loss: 4655.25781: Latent Loss: 415.181335: AE Accuracy: 0.69926\n",
      "Epoch = 44/50000 Total Loss: 1.98614: Recon Loss: 4411.38330: Latent Loss: 428.830688: AE Accuracy: 0.70597\n",
      "Epoch = 45/50000 Total Loss: 1.92288: Recon Loss: 4252.37354: Latent Loss: 433.684021: AE Accuracy: 0.71369\n",
      "Epoch = 46/50000 Total Loss: 1.84998: Recon Loss: 4073.18140: Latent Loss: 435.219360: AE Accuracy: 0.72558\n",
      "Epoch = 47/50000 Total Loss: 1.78888: Recon Loss: 3917.18506: Latent Loss: 442.306213: AE Accuracy: 0.73617\n",
      "Epoch = 48/50000 Total Loss: 1.72505: Recon Loss: 3751.57275: Latent Loss: 452.385406: AE Accuracy: 0.74117\n",
      "Epoch = 49/50000 Total Loss: 1.65481: Recon Loss: 3573.82227: Latent Loss: 458.943878: AE Accuracy: 0.74781\n",
      "Epoch = 50/50000 Total Loss: 1.60227: Recon Loss: 3447.03174: Latent Loss: 457.689148: AE Accuracy: 0.75354\n",
      "Epoch = 51/50000 Total Loss: 1.54930: Recon Loss: 3317.08130: Latent Loss: 458.556091: AE Accuracy: 0.76031\n",
      "Epoch = 52/50000 Total Loss: 1.50134: Recon Loss: 3193.32275: Latent Loss: 465.449463: AE Accuracy: 0.76453\n",
      "Epoch = 53/50000 Total Loss: 1.44346: Recon Loss: 3040.53784: Latent Loss: 477.183472: AE Accuracy: 0.77149\n",
      "Epoch = 54/50000 Total Loss: 1.41008: Recon Loss: 2954.66333: Latent Loss: 481.703979: AE Accuracy: 0.77253\n",
      "Epoch = 55/50000 Total Loss: 1.34588: Recon Loss: 2799.90723: Latent Loss: 479.999817: AE Accuracy: 0.77696\n",
      "Epoch = 56/50000 Total Loss: 1.30426: Recon Loss: 2697.51514: Latent Loss: 480.970276: AE Accuracy: 0.78207\n",
      "Epoch = 57/50000 Total Loss: 1.27261: Recon Loss: 2612.73535: Latent Loss: 488.618591: AE Accuracy: 0.78616\n",
      "Epoch = 58/50000 Total Loss: 1.24639: Recon Loss: 2537.75049: Latent Loss: 499.703369: AE Accuracy: 0.79246\n",
      "Epoch = 59/50000 Total Loss: 1.20291: Recon Loss: 2422.15674: Latent Loss: 509.329224: AE Accuracy: 0.79506\n",
      "Epoch = 60/50000 Total Loss: 1.16992: Recon Loss: 2337.33447: Latent Loss: 513.770996: AE Accuracy: 0.80029\n",
      "Epoch = 61/50000 Total Loss: 1.13417: Recon Loss: 2250.41699: Latent Loss: 513.548035: AE Accuracy: 0.80398\n",
      "Epoch = 62/50000 Total Loss: 1.10032: Recon Loss: 2169.14209: Latent Loss: 512.347412: AE Accuracy: 0.80757\n",
      "Epoch = 63/50000 Total Loss: 1.07336: Recon Loss: 2103.47021: Latent Loss: 512.316711: AE Accuracy: 0.80803\n",
      "Epoch = 64/50000 Total Loss: 1.05707: Recon Loss: 2060.13452: Latent Loss: 515.954102: AE Accuracy: 0.81095\n",
      "Epoch = 65/50000 Total Loss: 1.02774: Recon Loss: 1984.30176: Latent Loss: 520.307007: AE Accuracy: 0.81531\n",
      "Epoch = 66/50000 Total Loss: 1.00897: Recon Loss: 1937.22754: Latent Loss: 521.630859: AE Accuracy: 0.81759\n",
      "Epoch = 67/50000 Total Loss: 0.99436: Recon Loss: 1907.19849: Latent Loss: 516.048401: AE Accuracy: 0.81789\n",
      "Epoch = 68/50000 Total Loss: 0.96990: Recon Loss: 1850.91785: Latent Loss: 512.740051: AE Accuracy: 0.82182\n",
      "Epoch = 69/50000 Total Loss: 0.95107: Recon Loss: 1804.87317: Latent Loss: 512.889893: AE Accuracy: 0.82063\n",
      "Epoch = 70/50000 Total Loss: 0.93536: Recon Loss: 1767.54810: Latent Loss: 511.926270: AE Accuracy: 0.82321\n",
      "Epoch = 71/50000 Total Loss: 0.90980: Recon Loss: 1707.58740: Latent Loss: 509.590332: AE Accuracy: 0.82550\n",
      "Epoch = 72/50000 Total Loss: 0.91689: Recon Loss: 1725.07996: Latent Loss: 509.391418: AE Accuracy: 0.82513\n",
      "Epoch = 73/50000 Total Loss: 0.88712: Recon Loss: 1654.33081: Latent Loss: 507.587128: AE Accuracy: 0.82755\n",
      "Epoch = 74/50000 Total Loss: 0.88318: Recon Loss: 1649.68054: Latent Loss: 502.640167: AE Accuracy: 0.82697\n",
      "Epoch = 75/50000 Total Loss: 0.86296: Recon Loss: 1607.82690: Latent Loss: 495.204315: AE Accuracy: 0.82982\n",
      "Epoch = 76/50000 Total Loss: 0.85713: Recon Loss: 1600.13440: Latent Loss: 488.679382: AE Accuracy: 0.82975\n",
      "Epoch = 77/50000 Total Loss: 0.84149: Recon Loss: 1565.64807: Latent Loss: 485.057037: AE Accuracy: 0.83213\n",
      "Epoch = 78/50000 Total Loss: 0.83353: Recon Loss: 1548.57886: Latent Loss: 482.727722: AE Accuracy: 0.83178\n",
      "Epoch = 79/50000 Total Loss: 0.84000: Recon Loss: 1568.22852: Latent Loss: 478.846924: AE Accuracy: 0.83223\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch = 80/50000 Total Loss: 0.81766: Recon Loss: 1520.10791: Latent Loss: 472.527222: AE Accuracy: 0.83341\n",
      "Epoch = 81/50000 Total Loss: 0.81487: Recon Loss: 1518.15576: Latent Loss: 467.675629: AE Accuracy: 0.83374\n",
      "Epoch = 82/50000 Total Loss: 0.81433: Recon Loss: 1521.62500: Latent Loss: 462.908783: AE Accuracy: 0.83545\n",
      "Epoch = 83/50000 Total Loss: 0.80107: Recon Loss: 1494.28394: Latent Loss: 457.912170: AE Accuracy: 0.83528\n",
      "Epoch = 84/50000 Total Loss: 0.79583: Recon Loss: 1486.86475: Latent Loss: 452.578125: AE Accuracy: 0.83671\n",
      "Epoch = 85/50000 Total Loss: 0.79422: Recon Loss: 1487.31250: Latent Loss: 448.208618: AE Accuracy: 0.83701\n",
      "Epoch = 86/50000 Total Loss: 0.78491: Recon Loss: 1469.57227: Latent Loss: 443.251221: AE Accuracy: 0.83670\n",
      "Epoch = 87/50000 Total Loss: 0.77555: Recon Loss: 1451.39087: Latent Loss: 438.626465: AE Accuracy: 0.83611\n",
      "Epoch = 88/50000 Total Loss: 0.77019: Recon Loss: 1441.85620: Latent Loss: 435.094940: AE Accuracy: 0.83799\n",
      "Epoch = 89/50000 Total Loss: 0.76668: Recon Loss: 1437.14185: Latent Loss: 431.258728: AE Accuracy: 0.83769\n",
      "Epoch = 90/50000 Total Loss: 0.76301: Recon Loss: 1433.91138: Latent Loss: 425.537140: AE Accuracy: 0.83822\n",
      "Epoch = 91/50000 Total Loss: 0.75479: Recon Loss: 1419.87866: Latent Loss: 419.538910: AE Accuracy: 0.84095\n",
      "Epoch = 92/50000 Total Loss: 0.73750: Recon Loss: 1381.37402: Latent Loss: 415.902863: AE Accuracy: 0.84261\n",
      "Epoch = 93/50000 Total Loss: 0.74477: Recon Loss: 1402.60156: Latent Loss: 412.403229: AE Accuracy: 0.84015\n",
      "Epoch = 94/50000 Total Loss: 0.73318: Recon Loss: 1377.60474: Latent Loss: 409.151794: AE Accuracy: 0.84227\n",
      "Epoch = 95/50000 Total Loss: 0.74194: Recon Loss: 1401.30640: Latent Loss: 406.796021: AE Accuracy: 0.84048\n",
      "Epoch = 96/50000 Total Loss: 0.73485: Recon Loss: 1386.59790: Latent Loss: 404.228027: AE Accuracy: 0.84204\n",
      "Epoch = 97/50000 Total Loss: 0.72637: Recon Loss: 1368.29822: Latent Loss: 401.861359: AE Accuracy: 0.84262\n",
      "Epoch = 98/50000 Total Loss: 0.72138: Recon Loss: 1359.24121: Latent Loss: 398.758118: AE Accuracy: 0.84311\n",
      "Epoch = 99/50000 Total Loss: 0.71221: Recon Loss: 1340.69214: Latent Loss: 394.959839: AE Accuracy: 0.84396\n",
      "Epoch = 100/50000 Total Loss: 0.71086: Recon Loss: 1341.17603: Latent Loss: 391.198120: AE Accuracy: 0.84510\n",
      "Epoch = 101/50000 Total Loss: 0.71151: Recon Loss: 1346.17749: Latent Loss: 387.765625: AE Accuracy: 0.84351\n",
      "Epoch = 102/50000 Total Loss: 0.70763: Recon Loss: 1340.81689: Latent Loss: 383.665863: AE Accuracy: 0.84575\n",
      "Epoch = 103/50000 Total Loss: 0.69596: Recon Loss: 1315.11804: Latent Loss: 380.946075: AE Accuracy: 0.84705\n",
      "Epoch = 104/50000 Total Loss: 0.69489: Recon Loss: 1314.24902: Latent Loss: 379.195557: AE Accuracy: 0.84730\n",
      "Epoch = 105/50000 Total Loss: 0.69257: Recon Loss: 1311.22363: Latent Loss: 376.568390: AE Accuracy: 0.84561\n",
      "Epoch = 106/50000 Total Loss: 0.68747: Recon Loss: 1302.90601: Latent Loss: 372.465698: AE Accuracy: 0.84844\n",
      "Epoch = 107/50000 Total Loss: 0.68530: Recon Loss: 1302.41052: Latent Loss: 367.668762: AE Accuracy: 0.84792\n",
      "Epoch = 108/50000 Total Loss: 0.68520: Recon Loss: 1306.29834: Latent Loss: 363.536407: AE Accuracy: 0.84904\n",
      "Epoch = 109/50000 Total Loss: 0.68541: Recon Loss: 1309.36108: Latent Loss: 360.970978: AE Accuracy: 0.84866\n",
      "Epoch = 110/50000 Total Loss: 0.69188: Recon Loss: 1326.47852: Latent Loss: 359.622650: AE Accuracy: 0.84871\n",
      "Epoch = 111/50000 Total Loss: 0.68176: Recon Loss: 1301.03613: Latent Loss: 360.408478: AE Accuracy: 0.84928\n",
      "Epoch = 112/50000 Total Loss: 0.67878: Recon Loss: 1293.07178: Latent Loss: 361.121338: AE Accuracy: 0.85035\n",
      "Epoch = 113/50000 Total Loss: 0.67217: Recon Loss: 1277.86157: Latent Loss: 360.205780: AE Accuracy: 0.85079\n",
      "Epoch = 114/50000 Total Loss: 0.66691: Recon Loss: 1269.63525: Latent Loss: 355.617920: AE Accuracy: 0.85207\n",
      "Epoch = 115/50000 Total Loss: 0.66284: Recon Loss: 1264.98462: Latent Loss: 350.360016: AE Accuracy: 0.85251\n",
      "Epoch = 116/50000 Total Loss: 0.66245: Recon Loss: 1268.27380: Latent Loss: 346.110687: AE Accuracy: 0.85161\n",
      "Epoch = 117/50000 Total Loss: 0.65283: Recon Loss: 1244.39771: Latent Loss: 346.556885: AE Accuracy: 0.85328\n",
      "Epoch = 118/50000 Total Loss: 0.66326: Recon Loss: 1267.39160: Latent Loss: 348.983978: AE Accuracy: 0.85324\n",
      "Epoch = 119/50000 Total Loss: 0.65742: Recon Loss: 1252.40405: Latent Loss: 349.716736: AE Accuracy: 0.85448\n",
      "Epoch = 120/50000 Total Loss: 0.66321: Recon Loss: 1267.51807: Latent Loss: 348.735413: AE Accuracy: 0.85330\n",
      "Epoch = 121/50000 Total Loss: 0.64566: Recon Loss: 1229.86646: Latent Loss: 343.608093: AE Accuracy: 0.85638\n",
      "Epoch = 122/50000 Total Loss: 0.64875: Recon Loss: 1242.09375: Latent Loss: 338.911621: AE Accuracy: 0.85489\n",
      "Epoch = 123/50000 Total Loss: 0.65371: Recon Loss: 1254.84790: Latent Loss: 338.247009: AE Accuracy: 0.85501\n",
      "Epoch = 124/50000 Total Loss: 0.63929: Recon Loss: 1216.06482: Latent Loss: 341.892334: AE Accuracy: 0.85705\n",
      "Epoch = 125/50000 Total Loss: 0.64370: Recon Loss: 1223.76453: Latent Loss: 344.929199: AE Accuracy: 0.85623\n",
      "Epoch = 126/50000 Total Loss: 0.64910: Recon Loss: 1236.30908: Latent Loss: 345.548096: AE Accuracy: 0.85583\n",
      "Epoch = 127/50000 Total Loss: 0.63690: Recon Loss: 1209.37781: Latent Loss: 342.736877: AE Accuracy: 0.86020\n",
      "Epoch = 128/50000 Total Loss: 0.62825: Recon Loss: 1192.14417: Latent Loss: 338.913208: AE Accuracy: 0.85998\n",
      "Epoch = 129/50000 Total Loss: 0.63240: Recon Loss: 1204.81445: Latent Loss: 336.337830: AE Accuracy: 0.85908\n",
      "Epoch = 130/50000 Total Loss: 0.63086: Recon Loss: 1200.39624: Latent Loss: 337.007263: AE Accuracy: 0.86003\n",
      "Epoch = 131/50000 Total Loss: 0.62531: Recon Loss: 1185.22485: Latent Loss: 338.643829: AE Accuracy: 0.85990\n",
      "Epoch = 132/50000 Total Loss: 0.62960: Recon Loss: 1194.49292: Latent Loss: 339.851227: AE Accuracy: 0.86111\n",
      "Epoch = 133/50000 Total Loss: 0.62994: Recon Loss: 1195.65308: Latent Loss: 339.505981: AE Accuracy: 0.86156\n",
      "Epoch = 134/50000 Total Loss: 0.63086: Recon Loss: 1200.97412: Latent Loss: 336.435425: AE Accuracy: 0.86210\n",
      "Epoch = 135/50000 Total Loss: 0.62565: Recon Loss: 1192.11340: Latent Loss: 332.587067: AE Accuracy: 0.86251\n",
      "Epoch = 136/50000 Total Loss: 0.61745: Recon Loss: 1174.26685: Latent Loss: 330.449219: AE Accuracy: 0.86308\n",
      "Epoch = 137/50000 Total Loss: 0.62825: Recon Loss: 1200.49817: Latent Loss: 330.540039: AE Accuracy: 0.86143\n",
      "Epoch = 138/50000 Total Loss: 0.62012: Recon Loss: 1178.20752: Latent Loss: 333.032928: AE Accuracy: 0.86396\n",
      "Epoch = 139/50000 Total Loss: 0.61558: Recon Loss: 1164.11890: Latent Loss: 336.041290: AE Accuracy: 0.86433\n",
      "Epoch = 140/50000 Total Loss: 0.61893: Recon Loss: 1171.12061: Latent Loss: 337.212830: AE Accuracy: 0.86407\n",
      "Epoch = 141/50000 Total Loss: 0.61553: Recon Loss: 1166.06921: Latent Loss: 333.987946: AE Accuracy: 0.86482\n",
      "Epoch = 142/50000 Total Loss: 0.60471: Recon Loss: 1143.94031: Latent Loss: 329.731201: AE Accuracy: 0.86647\n",
      "Epoch = 143/50000 Total Loss: 0.60349: Recon Loss: 1143.22876: Latent Loss: 327.484070: AE Accuracy: 0.86671\n",
      "Epoch = 144/50000 Total Loss: 0.60746: Recon Loss: 1151.73584: Latent Loss: 328.648010: AE Accuracy: 0.86669\n",
      "Epoch = 145/50000 Total Loss: 0.60570: Recon Loss: 1144.82947: Latent Loss: 331.269989: AE Accuracy: 0.86760\n",
      "Epoch = 146/50000 Total Loss: 0.59726: Recon Loss: 1120.48560: Latent Loss: 335.028809: AE Accuracy: 0.87053\n",
      "Epoch = 147/50000 Total Loss: 0.59841: Recon Loss: 1120.60010: Latent Loss: 337.727264: AE Accuracy: 0.86789\n",
      "Epoch = 148/50000 Total Loss: 0.59960: Recon Loss: 1124.77185: Latent Loss: 336.448700: AE Accuracy: 0.86971\n",
      "Epoch = 149/50000 Total Loss: 0.59736: Recon Loss: 1124.17114: Latent Loss: 331.592560: AE Accuracy: 0.86891\n",
      "Epoch = 150/50000 Total Loss: 0.59307: Recon Loss: 1117.66357: Latent Loss: 327.655609: AE Accuracy: 0.87015\n",
      "Epoch = 151/50000 Total Loss: 0.59730: Recon Loss: 1129.68652: Latent Loss: 325.928070: AE Accuracy: 0.86929\n",
      "Epoch = 152/50000 Total Loss: 0.59423: Recon Loss: 1121.04126: Latent Loss: 327.089630: AE Accuracy: 0.87058\n",
      "Epoch = 153/50000 Total Loss: 0.58810: Recon Loss: 1103.83276: Latent Loss: 329.360413: AE Accuracy: 0.87165\n",
      "Epoch = 154/50000 Total Loss: 0.58857: Recon Loss: 1102.85620: Latent Loss: 331.492310: AE Accuracy: 0.87256\n",
      "Epoch = 155/50000 Total Loss: 0.57917: Recon Loss: 1080.71753: Latent Loss: 330.724152: AE Accuracy: 0.87291\n",
      "Epoch = 156/50000 Total Loss: 0.58086: Recon Loss: 1085.61487: Latent Loss: 329.931946: AE Accuracy: 0.87331\n",
      "Epoch = 157/50000 Total Loss: 0.58177: Recon Loss: 1090.62390: Latent Loss: 327.152344: AE Accuracy: 0.87323\n",
      "Epoch = 158/50000 Total Loss: 0.57929: Recon Loss: 1086.66431: Latent Loss: 325.067871: AE Accuracy: 0.87552\n",
      "Epoch = 159/50000 Total Loss: 0.57689: Recon Loss: 1080.48010: Latent Loss: 325.411896: AE Accuracy: 0.87448\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch = 160/50000 Total Loss: 0.57668: Recon Loss: 1078.64355: Latent Loss: 326.736145: AE Accuracy: 0.87524\n",
      "Epoch = 161/50000 Total Loss: 0.57804: Recon Loss: 1079.62109: Latent Loss: 329.053955: AE Accuracy: 0.87536\n",
      "Epoch = 162/50000 Total Loss: 0.57497: Recon Loss: 1071.36475: Latent Loss: 329.830170: AE Accuracy: 0.87530\n",
      "Epoch = 163/50000 Total Loss: 0.57827: Recon Loss: 1080.81592: Latent Loss: 328.438721: AE Accuracy: 0.87566\n",
      "Epoch = 164/50000 Total Loss: 0.56397: Recon Loss: 1048.44653: Latent Loss: 325.949524: AE Accuracy: 0.87754\n",
      "Epoch = 165/50000 Total Loss: 0.56792: Recon Loss: 1059.98413: Latent Loss: 324.031982: AE Accuracy: 0.87830\n",
      "Epoch = 166/50000 Total Loss: 0.56465: Recon Loss: 1052.60901: Latent Loss: 323.443970: AE Accuracy: 0.87702\n",
      "Epoch = 167/50000 Total Loss: 0.56876: Recon Loss: 1062.57861: Latent Loss: 323.492493: AE Accuracy: 0.87748\n",
      "Epoch = 168/50000 Total Loss: 0.55716: Recon Loss: 1034.16858: Latent Loss: 323.640533: AE Accuracy: 0.87886\n",
      "Epoch = 169/50000 Total Loss: 0.56532: Recon Loss: 1054.07007: Latent Loss: 323.624817: AE Accuracy: 0.87766\n",
      "Epoch = 170/50000 Total Loss: 0.56507: Recon Loss: 1054.34790: Latent Loss: 322.715546: AE Accuracy: 0.87783\n",
      "Epoch = 171/50000 Total Loss: 0.55721: Recon Loss: 1036.50989: Latent Loss: 321.402344: AE Accuracy: 0.88021\n",
      "Epoch = 172/50000 Total Loss: 0.55933: Recon Loss: 1043.41821: Latent Loss: 319.665833: AE Accuracy: 0.87958\n",
      "Epoch = 173/50000 Total Loss: 0.55341: Recon Loss: 1028.65576: Latent Loss: 320.011597: AE Accuracy: 0.88068\n",
      "Epoch = 174/50000 Total Loss: 0.56106: Recon Loss: 1046.71143: Latent Loss: 320.601624: AE Accuracy: 0.88028\n",
      "Epoch = 175/50000 Total Loss: 0.55705: Recon Loss: 1036.62244: Latent Loss: 320.904266: AE Accuracy: 0.88112\n",
      "Epoch = 176/50000 Total Loss: 0.55564: Recon Loss: 1032.30286: Latent Loss: 321.787140: AE Accuracy: 0.88117\n",
      "Epoch = 177/50000 Total Loss: 0.55404: Recon Loss: 1028.76819: Latent Loss: 321.431427: AE Accuracy: 0.88093\n",
      "Epoch = 178/50000 Total Loss: 0.54863: Recon Loss: 1015.78528: Latent Loss: 321.222626: AE Accuracy: 0.88266\n",
      "Epoch = 179/50000 Total Loss: 0.55286: Recon Loss: 1025.98242: Latent Loss: 321.333710: AE Accuracy: 0.88113\n",
      "Epoch = 180/50000 Total Loss: 0.55088: Recon Loss: 1019.78967: Latent Loss: 322.698547: AE Accuracy: 0.88233\n",
      "Epoch = 181/50000 Total Loss: 0.55624: Recon Loss: 1031.81641: Latent Loss: 323.731323: AE Accuracy: 0.88286\n",
      "Epoch = 182/50000 Total Loss: 0.54550: Recon Loss: 1004.14893: Latent Loss: 325.234924: AE Accuracy: 0.88377\n",
      "Epoch = 183/50000 Total Loss: 0.55123: Recon Loss: 1018.58691: Latent Loss: 324.770538: AE Accuracy: 0.88328\n",
      "Epoch = 184/50000 Total Loss: 0.53589: Recon Loss: 982.28088: Latent Loss: 323.676514: AE Accuracy: 0.88624\n",
      "Epoch = 185/50000 Total Loss: 0.54538: Recon Loss: 1004.98993: Latent Loss: 324.095215: AE Accuracy: 0.88548\n",
      "Epoch = 186/50000 Total Loss: 0.54369: Recon Loss: 999.76300: Latent Loss: 325.209717: AE Accuracy: 0.88518\n",
      "Epoch = 187/50000 Total Loss: 0.54626: Recon Loss: 1004.96301: Latent Loss: 326.272797: AE Accuracy: 0.88528\n",
      "Epoch = 188/50000 Total Loss: 0.54518: Recon Loss: 1002.29028: Latent Loss: 326.325500: AE Accuracy: 0.88492\n",
      "Epoch = 189/50000 Total Loss: 0.54209: Recon Loss: 995.68713: Latent Loss: 325.376556: AE Accuracy: 0.88715\n",
      "Epoch = 190/50000 Total Loss: 0.55096: Recon Loss: 1017.22589: Latent Loss: 325.474731: AE Accuracy: 0.88475\n",
      "Epoch = 191/50000 Total Loss: 0.53158: Recon Loss: 968.19189: Latent Loss: 327.260254: AE Accuracy: 0.88855\n",
      "Epoch = 192/50000 Total Loss: 0.53836: Recon Loss: 982.88660: Latent Loss: 329.106873: AE Accuracy: 0.88637\n",
      "Epoch = 193/50000 Total Loss: 0.52855: Recon Loss: 958.26501: Latent Loss: 329.800537: AE Accuracy: 0.88965\n",
      "Epoch = 194/50000 Total Loss: 0.52771: Recon Loss: 957.96771: Latent Loss: 328.059265: AE Accuracy: 0.88842\n",
      "Epoch = 195/50000 Total Loss: 0.52662: Recon Loss: 956.88055: Latent Loss: 326.490387: AE Accuracy: 0.88927\n",
      "Epoch = 196/50000 Total Loss: 0.53196: Recon Loss: 970.61017: Latent Loss: 325.786072: AE Accuracy: 0.88842\n",
      "Epoch = 197/50000 Total Loss: 0.52591: Recon Loss: 955.36786: Latent Loss: 326.272949: AE Accuracy: 0.89042\n",
      "Epoch = 198/50000 Total Loss: 0.53116: Recon Loss: 967.21130: Latent Loss: 327.217651: AE Accuracy: 0.88847\n",
      "Epoch = 199/50000 Total Loss: 0.52606: Recon Loss: 954.02277: Latent Loss: 327.995667: AE Accuracy: 0.89016\n",
      "Epoch = 200/50000 Total Loss: 0.51715: Recon Loss: 931.34772: Latent Loss: 328.947876: AE Accuracy: 0.89106\n",
      "Epoch = 201/50000 Total Loss: 0.51763: Recon Loss: 932.41095: Latent Loss: 329.065094: AE Accuracy: 0.89238\n",
      "Epoch = 202/50000 Total Loss: 0.52143: Recon Loss: 942.10425: Latent Loss: 328.626251: AE Accuracy: 0.89126\n",
      "Epoch = 203/50000 Total Loss: 0.52556: Recon Loss: 952.26685: Latent Loss: 328.511353: AE Accuracy: 0.89188\n",
      "Epoch = 204/50000 Total Loss: 0.51565: Recon Loss: 928.15222: Latent Loss: 328.497467: AE Accuracy: 0.89308\n",
      "Epoch = 205/50000 Total Loss: 0.51741: Recon Loss: 932.32690: Latent Loss: 328.600525: AE Accuracy: 0.89316\n",
      "Epoch = 206/50000 Total Loss: 0.51937: Recon Loss: 937.02057: Latent Loss: 328.692505: AE Accuracy: 0.89288\n",
      "Epoch = 207/50000 Total Loss: 0.51907: Recon Loss: 935.41351: Latent Loss: 329.550476: AE Accuracy: 0.89391\n",
      "Epoch = 208/50000 Total Loss: 0.51651: Recon Loss: 929.61316: Latent Loss: 329.115967: AE Accuracy: 0.89415\n",
      "Epoch = 209/50000 Total Loss: 0.51751: Recon Loss: 934.21057: Latent Loss: 326.972137: AE Accuracy: 0.89411\n",
      "Epoch = 210/50000 Total Loss: 0.50886: Recon Loss: 913.55243: Latent Loss: 326.530609: AE Accuracy: 0.89499\n",
      "Epoch = 211/50000 Total Loss: 0.51642: Recon Loss: 932.47095: Latent Loss: 326.043732: AE Accuracy: 0.89513\n",
      "Epoch = 212/50000 Total Loss: 0.50625: Recon Loss: 907.74390: Latent Loss: 325.975922: AE Accuracy: 0.89555\n",
      "Epoch = 213/50000 Total Loss: 0.52292: Recon Loss: 948.00751: Latent Loss: 326.337616: AE Accuracy: 0.89406\n",
      "Epoch = 214/50000 Total Loss: 0.50223: Recon Loss: 899.84998: Latent Loss: 324.095490: AE Accuracy: 0.89542\n",
      "Epoch = 215/50000 Total Loss: 0.50924: Recon Loss: 918.72021: Latent Loss: 322.301605: AE Accuracy: 0.89537\n",
      "Epoch = 216/50000 Total Loss: 0.51907: Recon Loss: 942.09265: Latent Loss: 322.882629: AE Accuracy: 0.89303\n",
      "Epoch = 217/50000 Total Loss: 0.51153: Recon Loss: 924.39368: Latent Loss: 322.203156: AE Accuracy: 0.89487\n",
      "Epoch = 218/50000 Total Loss: 0.51252: Recon Loss: 925.44421: Latent Loss: 323.564178: AE Accuracy: 0.89454\n",
      "Epoch = 219/50000 Total Loss: 0.50725: Recon Loss: 911.39148: Latent Loss: 324.781403: AE Accuracy: 0.89581\n",
      "Epoch = 220/50000 Total Loss: 0.50077: Recon Loss: 894.36707: Latent Loss: 326.010498: AE Accuracy: 0.89607\n",
      "Epoch = 221/50000 Total Loss: 0.51024: Recon Loss: 915.82123: Latent Loss: 327.633789: AE Accuracy: 0.89577\n",
      "Epoch = 222/50000 Total Loss: 0.49992: Recon Loss: 891.35461: Latent Loss: 326.947388: AE Accuracy: 0.89646\n",
      "Epoch = 223/50000 Total Loss: 0.50339: Recon Loss: 900.77087: Latent Loss: 325.996826: AE Accuracy: 0.89587\n",
      "Epoch = 224/50000 Total Loss: 0.50361: Recon Loss: 901.22412: Latent Loss: 326.072632: AE Accuracy: 0.89550\n",
      "Epoch = 225/50000 Total Loss: 0.49713: Recon Loss: 884.49231: Latent Loss: 327.008240: AE Accuracy: 0.89805\n",
      "Epoch = 226/50000 Total Loss: 0.51115: Recon Loss: 916.92230: Latent Loss: 328.749573: AE Accuracy: 0.89590\n",
      "Epoch = 227/50000 Total Loss: 0.50447: Recon Loss: 898.57617: Latent Loss: 330.814423: AE Accuracy: 0.89784\n",
      "Epoch = 228/50000 Total Loss: 0.50037: Recon Loss: 888.12512: Latent Loss: 331.281311: AE Accuracy: 0.89811\n",
      "Epoch = 229/50000 Total Loss: 0.50161: Recon Loss: 891.97961: Latent Loss: 330.434692: AE Accuracy: 0.89797\n",
      "Epoch = 230/50000 Total Loss: 0.49098: Recon Loss: 866.96765: Latent Loss: 329.560516: AE Accuracy: 0.89968\n",
      "Epoch = 231/50000 Total Loss: 0.49687: Recon Loss: 880.96777: Latent Loss: 329.908844: AE Accuracy: 0.89887\n",
      "Epoch = 232/50000 Total Loss: 0.49196: Recon Loss: 868.08887: Latent Loss: 330.806030: AE Accuracy: 0.90086\n",
      "Reconstruction Accuracy: 0.89830\n",
      "Training Done\n"
     ]
    }
   ],
   "source": [
    "DTCRU.Train_VAE(Load_Prev_Data=False,accuracy_min=0.9,latent_dim=12)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can also choose to suppress the commandline output and use only sequence information or only gene-usage information as so:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Reconstruction Accuracy: 0.89811\n",
      "Training Done\n"
     ]
    }
   ],
   "source": [
    "DTCRU.Train_VAE(Load_Prev_Data=False,accuracy_min=0.9,latent_dim=12,suppress_output=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Reconstruction Accuracy: 0.99528\n",
      "Training Done\n"
     ]
    }
   ],
   "source": [
    "DTCRU.Train_VAE(Load_Prev_Data=False,latent_dim=12,suppress_output=True,use_only_gene=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Following training, we can extract the featurized data by pulling the object variable called features."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(2437, 12)\n"
     ]
    }
   ],
   "source": [
    "features = DTCRU.features\n",
    "print(features.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
